<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta name="renderer" content="webkit">
		<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
		<link rel="stylesheet" href="css/icon.css">
		<title></title>
		<style>
			p,body{
				margin:0;
			}
			p{
				font-size:.27rem;
				letter-spacing:1px;
			}
			body{
				background:url(img/downbg.png) no-repeat;
				background-size: 100% auto;
			}
			
			.content{
				position:fixed;
				bottom:0;
				left:0;
				right:0;
				min-height:100px;
			}
			
			.float{
				float: left;
				width: 50%;
				padding: 5%;
			}
			.andui{
				background-color: #fff;
				color: #000;
			}
			.ios{
				background-color: #666;
				color: #fff;
			}
			.button{
				line-height: .8rem;
				text-align: center;
				border-radius: .05rem;
				border:1px solid #666
			}
			.button i{
				margin-right: .2rem;
			}
			.toRegister img{
				width:100%;
			}
			.toRegister{
				display: block;
				width:100%;
			}
			.topRight {
				display: none;
				position: fixed;
				top: 0px;
				right: 10px;
				width: 135px;
				height: 66px;
				line-height: 18px;
				padding: 20px 10px 10px;
				background: url(img/topright.png);
				background-size: 100% 100%;
				color: #fff;
			}
		</style>
		<script>
			window.onload = function() {
				getRem(720, 100)
			};
			window.onresize = function() {
				getRem(720, 100)
			};

			function getRem(pwidth, prem) {
				var html = document.getElementsByTagName("html")[0];
				var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
				html.style.fontSize = oWidth / pwidth * prem + "px";
			}
		</script>
		<script src="bower_components/jquery/dist/jquery.min.js"></script>
	</head>

	<body>
		<div class="content">
			<div class="topRight">请点击右上方选择“浏览器打开”</div>
			<div class="float"><div class="ios button"><i class="iconfont icon-IOS"></i>IOS下载</div></div>
			<div class="float"><div class="andui button"><i class="iconfont icon-ai-app"></i>安卓下载</div></div>
		</div>
		<input type="hidden" value="" id="session_id"/>
		<script type="text/javascript" src="js/fun.js"></script>
		<script type="text/javascript">
			
			
			
			function phoneSystem() {
				var phone = 3;
				var u = navigator.userAgent,
					app = navigator.appVersion;
				console.log(u);
				var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
				var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
				if(isAndroid) {
					console.log(111);
					//这个是安卓操作系统
					phone = 2;
				}
				if(isIOS) {
					console.log(222);　　　　 //这个是ios操作系统
					phone = 1;
				}
				return phone;
			}
			var phone = phoneSystem();
			
			$.ajax({
				type:'post',
				url:'https://wallet.gtargt.com/'+"/GetAppDownload",
				dataType:'json',
				success:function(res){
					if(res.status == 1){
						//iosUrl = res.data.android.url
						//azUrl = res.data.ios.url
						
						$(".andui").attr('url',res.data.android.url)
						$(".ios").attr('url',res.data.ios.url)
					}else{
						alert(res.result.status.msg)
					}
					
				}
			})
			function isWeiXin(){
			    var ua = window.navigator.userAgent.toLowerCase();
			    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
			        return true;
			    }else{
			        return false;
			    }
			}
			// function version(platform){
			// 	$.ajax({
			// 		type:'get',
			// 		url:h5Url+"/version/latest?platform="+platform,
			// 		dataType:'json',
			// 		success:function(res){
			// 			if(res.result.status.code==200){
			// 				window.location.href=res.result.payload.url
			// 			}else{
			// 				alert(res.result.status.msg)
			// 			}
						
			// 		}
			// 	})
			// }
			
			$(function(){
				
				
				$(".button").click(function(){
					if(!isWeiXin()){
						$(".topRight").show()
					}else{
						var url = $(this).attr("url")
						window.location.href = url
					}
				})
				
				$(".topRight").click(function(){
					$(this).hide()
				})
				
				
			})
		</script>
	</body>

</html>